package com.homeinns.lyx.server.utils;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;

public class JsonUtil {

    private static ObjectMapper objectMapper = new ObjectMapper();

    public static Object fromJson(String message, TypeReference typeReference){

        try{
            return objectMapper.readValue(message, typeReference);

        }catch (Exception e){
            return null;
        }
    }
}
